﻿@model Model.ViewModel.LoginViewModel
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    @Scripts.Render("~/Scripts/MvcAjax")
    <script src="~/Scripts/jquery.extention.js"></script>
    <script type="text/javascript">
        function Success() {
            window.location.href = "/Admin/Admin/Index";
        }
        function ProcessMessage(jsonDate) {
            $.ProcessMessage(jsonDate, Success);
        }
    </script>
    <title>Login</title>
</head>
<body>
    <div>
        @using (Ajax.BeginForm(new AjaxOptions()
        {
            HttpMethod = "post",
            OnSuccess = "ProcessMessage",
            LoadingElementId = "divMsg"
        }))
        {
            <table>
                <tr>
                    <td>@Html.DisplayNameFor(m=>m.uLoginName)</td>
                    <td>@Html.TextBoxFor(m => m.uLoginName,new{value="admin"})</td>
                    <td>@Html.ValidationMessageFor(m => m.uLoginName)</td>
                </tr>
                <tr>
                    <td>@Html.DisplayNameFor(m => m.uPwd)</td>
                    <td>@Html.TextBoxFor(m => m.uPwd)</td>
                    <td>@Html.ValidationMessageFor(m => m.uPwd)</td>
                </tr>
                <tr>
                    <td>@Html.DisplayNameFor(m => m.IsChecked)</td>
                    <td>@Html.CheckBoxFor(m => m.IsChecked)</td>
                    <td><input type="submit" value="登陆" /></td>
                </tr>
            </table>
        }
        <div id="divMsg" style="display: none">加载中~~~</div>
    </div>
</body>
</html>
